| Conditions | 1 |
| Paths | 1 |
| Total Lines | 28 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | 'use strict'; |
||
| 8 | describe('test', () => { |
||
| 9 | let firebaseAuth = new FirebaseAuth(firebaseConfig, serviceKey); |
||
| 10 | |||
| 11 | it('signIn should return a string with idToken', () => { |
||
| 12 | return firebaseAuth.signIn('[email protected]', 'testtest') |
||
| 13 | .then((res) => { |
||
| 14 | assert('string', typeof(res)); |
||
| 15 | }); |
||
| 16 | }); |
||
| 17 | |||
| 18 | it('signIn should return a an object code and message', () => { |
||
| 19 | return firebaseAuth.signIn('fail', 'fail') |
||
| 20 | .catch((err) => { |
||
| 21 | assert('object', typeof(err)); |
||
| 22 | }); |
||
| 23 | }); |
||
| 24 | |||
| 25 | it('authToken should return true if token is valid', () => { |
||
| 26 | return firebaseAuth.signIn('[email protected]', 'testtest') |
||
| 27 | .then((idToken) => { |
||
| 28 | return firebaseAuth.authToken(idToken) |
||
| 29 | .then(() => { |
||
| 30 | return true; |
||
| 31 | }); |
||
| 32 | }); |
||
| 33 | }) |
||
| 34 | |||
| 35 | }); |
||
| 36 |